def text = textArea.text
[
    /\t/ : " "*4,
    /\.get([a-zA-Z0-9_]+)\s*\(\s*\)/ : { all, part -> "." + part[0].toLowerCase() + part[1..-1] },
    /System\.out\./ : "",
    /\.set(\w+)\s*\(([a-zA-Z0-9_ "'.]+)\)/ : { all, property, obj -> "." + property[0].toLowerCase() + property[1..-1] + " = " + obj },
].each{
    text = text.replaceAll(it.key, it.value)
}
[
    / +$/ : "",
    /;$/ : "",
    /(?<=^\s*)public\s+/ : "",
].each{ key, value ->
    text = text.split("\n").collect{ it.replaceAll(key, value) }.join("\n")
}
textArea.text = text